home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-02 | 958 b | 21 lines | [TEXT/ToyS] |
- --This script shows how to communicate with a MacHTTP server running on a
- -- remote Mac. This script returns important stats about the health of the
- -- server and how many users it's served. It is intended to be used as a
- -- stand-alone "application" and not as a script executed by MacHTTP.
- --
- --You must change or delete the "machine" and "zone" arguments below as
- -- appropriate for your site.
-
- tell application "MacHTTP" of machine "Some Mac" of zone "Some Zone"
- set rep to Status Report
- end tell
- set AppleScript's text item delimiters to ","
- set connections to word 2 of text item 1 of rep
- set bytes to word 2 of text item 12 of rep as integer
- set bytes to round (bytes / 1024)
- set currMem to word 2 of text item 10 of rep
- set timeouts to word 2 of text item 8 of rep
- set output to "Connections: " & connections & " Transmitted: " & bytes & "K" & return
- set output to output & "Memory: " & currMem & " Timeouts: " & timeouts
- display dialog output
-